class Solution(object):
    def isPowerOfTwo(self, n):
        """
        :type n: int
        :rtype: bool
        """
        if n <= 0:
            return False
        if n & (n - 1) == 0:
            return True
        else:
            return False




data = Solution()
n = 8
print(data.isPowerOfTwo(n))
